package com.zc.study.designPattern.结构型设计模式.decoratePattern;

public class Test {
    public static void main(String[] args) {
        Component component, componentSB,componentbb; //使用抽象构件定义
        component = new Window();
        componentSB = new ScrollBarDecorator(component);//将装饰了一次的对象注入到另一个装饰类中,进行第二次装饰
        componentbb = new BlackBorderDecorator(componentSB);
        componentbb.display();
    }
}
